    When the path to follow is set and the current pose of the robot is received, the robot looks for its goal point.  To choose that goal point, all points in the path are converted to the robot coordinate system, i.e. the coordinate system where the robot corresponds to the origin.\\

    The robot chooses this goal point by searching for the points on the transformed path that are within a certain look-ahead distance, which is a constant. The robot will then choose the point on the path that is furthest away from itself within this look-ahead distance and head towards it.  If no point can be found within the look-ahead distance, the robot will choose the point closest to itself, e.g. the point at the minimum distance of the robot.\\
    
     This procedure will repeat itself for choosing all points ahead on the path.